package com.vst.serverdatalib.entity;

import org.json.JSONObject;

import android.text.TextUtils;

public class LiveSubcribe {

    public String mChannelId;

    public String mChannelName;

    public String mTvShowName;

    public String mStartTime;

    public String mEndTime;

    public String mPoster;

    public LiveSubcribe(String json) {
        if (TextUtils.isEmpty(json)) {
            return;
        }
        try {
            JSONObject object = new JSONObject(json);
            mChannelId = object.optString("channel_id");
            mChannelName = object.optString("channel_name");
            mTvShowName = object.optString("tv_show_name");
            mStartTime = object.optString("start_time");
            mEndTime = object.optString("end_time");
            mPoster = object.optString("play_bill");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    @Override
    public String toString() {
        StringBuffer sb = new StringBuffer("LiveSubcribe: mChannelId= ");
        sb.append(mChannelId).append(",mChannelName = ").append(mChannelName).append(",mTvShowName = ")
                .append(mTvShowName).append(",mStartTime = ").append(mStartTime).append(",mEndTime = ")
                .append(mEndTime).append(",mPoster = ").append(mPoster);
        return sb.toString();
    }
}
